/**
 * Copyright (C), 2015-2021, XXX有限公司
 * FileName: MaPackServiceImpl
 * Author:   Administrator
 * Date:     2021/8/5 0005 16:43
 * Description:
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package cn.hxlc.tie.demo.modular.material.service.impl;

import cn.hxlc.tie.demo.modular.material.entity.MaPack;
import cn.hxlc.tie.demo.modular.material.mapper.MaPackMapper;
import cn.hxlc.tie.demo.modular.material.model.param.MaPackParam;
import cn.hxlc.tie.demo.modular.material.model.result.MaPackResult;
import cn.hxlc.tie.demo.modular.material.service.MaPackService;
import cn.hxlc.tie.libs.mp.page.PageFactory;
import cn.hxlc.tie.model.page.PageResult;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * 〈一句话功能简述〉<br> 
 * 〈〉
 *
 * @author Administrator
 * @create 2021/8/5 0005
 * @since 1.0.0
 */
@Service
@Transactional
public class MaPackServiceImpl extends ServiceImpl<MaPackMapper, MaPack> implements MaPackService {


    @Override
    public PageResult<MaPackResult> findPageBySpec(MaPackParam param){
        Page pageContext = getPageContext();
        IPage<MaPackResult> page = this.baseMapper.customPageList(pageContext, param);
        return new PageResult<>(page);
    }

    private Page getPageContext() {
        return PageFactory.defaultPage();
    }
}
